package cn.ruituo.web.ctrl;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

/**
 * @author oldliu
 * @since 1.0
 */
public class StudentController {
    public String search(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        return "/students.jsp";
    }

    public void get(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print("查询学生的全部信息，给你看");
    }

    public void toUpdate(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print("查询学生的全部信息，准被修改");

        req.getRequestDispatcher("/updateSTudent.jsp").forward(req,resp);
    }

    public void update(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print(" 修改学生的全部信息 ");
    }

    public void del(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print("删除学生");
    }

    public void addExam(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print("给学生添加考试成绩");
    }

    public void searchExam(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        resp.getWriter().print("查询学生的全部考试成绩，不分页");
    }

}
